import java.util.concurrent.Semaphore;
import java.util.concurrent.locks.LockSupport;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 邓大帅
 * Date: 2024-01-27
 * Time: 13:07
 */
public class ThreadDemo10 {
    static Thread t,t1,t2;
    public static void main(String[] args) {
        t = new Thread(() -> {
            try {
                t2.join();
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            System.out.print("A");
        });
        t1 = new Thread(() -> {
            try {
                t2.join();
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            System.out.print("B");
        });
        t2 = new Thread(() -> {
            System.out.print("C");
        });
        t.start();
        t1.start();
        t2.start();
    }
}
